import http from "@/utils/http.js"

const url = {
    // 日报上传
    dailyExcelImport: "/daily/excelImport",
    // 月报上传
    monthlyExcelImport: "/monthly/importMonthly",
    // 获取部门id
    getDepIdToName: "/dep/getDepIdToName",
    // 手工上报水量-新增+修改
    manualEntry: "/waterYield/manualEntry",
    // 导入大屏所有模块
    importAll: "/visualScreen/importAll",
    // 查询水量数据
    queryWater: "/waterYield/queryWater",
    // 日报模版下载
    dailyDownload: "/daily/dowmload/",
    // 月报模版下载
    monthlyDownload: "/monthly/dowmload/",
    // 下载生产数据模版
    dowmloadProduction: "/monthly/dowmloadProduction",
    // 导入生产数据
    waterYield: "/waterYield/importWater",
    // 可视化大屏模板下载
    dowmloadVisualScreen: "/monthly/dowmloadVisualScreen",
}



export default {
    url: url,
    // 日报上传
    dailyExcelImport(params) {
        return http.post(url.dailyExcelImport, params, 'formData')
    },
    // 月报上传
    monthlyExcelImport(params) {
        return http.post(url.monthlyExcelImport, params, 'formData')
    },
    // 获取部门id
    getDepIdToName(params) {
        return http.post(url.monthlyExcelImport, params)
    },
    // 手工上报水量-新增+修改
    manualEntry(params) {
        return http.post(url.manualEntry, params)
    },
    // 导入大屏所有模块
    importAll(params) {
        return http.post(url.importAll, params, 'formData')
    },
    // 查询水量数据
    queryWater(params) {
        return http.post(url.queryWater, params)
    },
    // 日报模版下载
    dailyDownload(params) {
        return http.export(url.dailyDownload + params)
    },
    // 月报模版下载
    monthlyDownload(params) {
        return http.export(url.monthlyDownload + params)
    },
    // 月报模版下载
    dowmloadProduction() {
        return http.export(url.dowmloadProduction)
    },
    // 可视化大屏模板下载
    dowmloadVisualScreen() {
        return http.export(url.dowmloadVisualScreen)
    },
    // 导入生产数据
    waterYield(params) {
        return http.post(url.waterYield, params, 'formData')
    },
}